package com.mike.mybatis;

import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;

public class ClassUtils {
    public ClassUtils() {
    }

    public static Class genericType(Integer index, Class clazz) {
        try {
            ParameterizedType genType = (ParameterizedType)clazz.getGenericSuperclass();
            Type[] params = genType.getActualTypeArguments();
            return (Class)params[index];
        } catch (Exception var4) {
            throw new RuntimeException("not found");
        }
    }
}